#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int n, flag = 1;
	double sum = 0;
	scanf("%d", &n);

	for (int i = 1; i <= n; i++)
	{
		sum += flag * 1.0 / (3 * i - 2);
		flag = -flag;  //正负反转
	}

	printf("%.4lf", sum);
	return 0;
}